//
//  OilHeaderView.swift
//  TrafficViolation
//
//  Created by eaglelive on 2017/5/24.
//  Copyright © 2017年 eaglelive. All rights reserved.
//

import Foundation
import UIKit
class OilHeaderView:UIView {
    override func layoutSubviews() {
        super.layoutSubviews()
        let backgroundView = UIView()
        backgroundView.layer.borderColor = colorFromHex(0xeeeeee).cgColor
        backgroundView.layer.borderWidth = 1
        backgroundView.layer.masksToBounds = true
        backgroundView.backgroundColor = UIColor.white
        self.addSubview(backgroundView)
        backgroundView.snp.makeConstraints { (make) in
            make.left.equalTo(self)
            make.top.equalTo(self)
            make.right.equalTo(self)
            make.bottom.equalTo(self)
        }
        let province = UILabel()
        province.textColor = appMainColor
        province.font = UIFont.systemFont(ofSize: 13)
        province.text = "省份"
        province.textAlignment = .center
        backgroundView.addSubview(province)
        province.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(backgroundView.snp.left)
        }
        let oil0 = UILabel()
        oil0.textColor = appMainColor
        oil0.font = UIFont.systemFont(ofSize: 13)
        oil0.text = "0号"
        oil0.textAlignment = .center
        backgroundView.addSubview(oil0)
        oil0.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(province.snp.right)
        }
        let oil89 = UILabel()
        oil89.textColor = appMainColor
        oil89.font = UIFont.systemFont(ofSize: 13)
        oil89.text = "89号"
        oil89.textAlignment = .center
        backgroundView.addSubview(oil89)
        oil89.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil0.snp.right)
        }
        let oil90 = UILabel()
        oil90.textColor = appMainColor
        oil90.font = UIFont.systemFont(ofSize: 13)
        oil90.text = "90号"
        oil90.textAlignment = .center
        backgroundView.addSubview(oil90)
        oil90.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil89.snp.right)
        }
        let oil92 = UILabel()
        oil92.textColor = appMainColor
        oil92.font = UIFont.systemFont(ofSize: 13)
        oil92.text = "92号"
        oil92.textAlignment = .center
        backgroundView.addSubview(oil92)
        oil92.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil90.snp.right)
        }
        let oil93 = UILabel()
        oil93.textColor = appMainColor
        oil93.font = UIFont.systemFont(ofSize: 13)
        oil93.text = "93号"
        oil93.textAlignment = .center
        backgroundView.addSubview(oil93)
        oil93.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil92.snp.right)
        }
        let oil95 = UILabel()
        oil95.textColor = appMainColor
        oil95.font = UIFont.systemFont(ofSize: 13)
        oil95.text = "95号"
        oil95.textAlignment = .center
        backgroundView.addSubview(oil95)
        oil95.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil93.snp.right)
        }
        let oil97 = UILabel()
        oil97.textColor = appMainColor
        oil97.font = UIFont.systemFont(ofSize: 13)
        oil97.text = "97号"
        oil97.textAlignment = .center
        backgroundView.addSubview(oil97)
        oil97.snp.makeConstraints { (make) in
            make.width.equalTo(kScreenW/8)
            make.height.equalTo(40)
            make.top.equalTo(backgroundView.snp.top)
            make.left.equalTo(oil95.snp.right)
        }
    }
}

